package scr;

public class Training06 {
    public static void main(String[] args) {pringTriangle( 15); }

    public static void pringTriangle(int height){
        //todo 1.循环行高
        //todo 2.在大循环内循环输入空格 使用print输出
        //todo 3.在大循环内并列输出星号符号  使用print输出
        for (int i = 1; i <= height; i = i + 2) {
            for (int j = 0; j < (height - i)/2; j++) {
                System.out.print(" ");
            }
            for (int j = 0; j < i; j++) {
                System.out.print("*");
            }
            System.out.print("\n");
        }
        System.out.print("\n");
    }
}
